import http from '@/utils/request'
import request from '@/utils/requestOther'


export default{

    /**
      * 上传
      * @returns
      */
  async upload(params){
    return await http.post("/api/picture/manager/upload",params);
  },

    /**
      * 条件belongs查询
      * @returns
      */
    async list(params){
        return await http.get("/api/picture/manager/list",params);
      },
  /**
      * 添加图片
      * @returns
      */
  async addPictureApi(params) {
    return await http.post("/api/picture/manager/add", params);
},

/**
  * 编辑图片
  * @returns
  */
  async updatePictureApi(params) {
    return await http.put("/api/picture/manager/edit", params);
},
   /**
    * 删除图片
    * @returns
    */
   async deletePictureApi(params) {
     return await http.delete("/api/picture/manager/delete", params);
},

  /**
    * 编辑图片
    * @returns
    */
  async editPictureTag(pictureId, tags, Obj) {
    return request({
      url: `/api/picture/manager/editPictureTag/${pictureId}/${tags}`,
      method: 'put',
      params : Obj
  });
  },
}